/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.evangelion.core.bean;

import com.evangelion.core.FacturaProveedor;
import java.io.Serializable;
import java.util.List;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Kellycasma
 */
@Entity
@Table(name = "secciones")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Seccione.findAll", query = "SELECT s FROM Seccione s"),
    @NamedQuery(name = "Seccione.findById", query = "SELECT s FROM Seccione s WHERE s.id = :id"),
    @NamedQuery(name = "Seccione.findByNombre", query = "SELECT s FROM Seccione s WHERE s.nombre = :nombre"),
    @NamedQuery(name = "Seccione.findByIdCliente", query = "SELECT s FROM Seccione s WHERE s.cliente = :idCliente")})
public class Seccione implements Serializable {
    @OneToMany(mappedBy = "seccion")

    private List<FacturaAlumno> facturaAlumnoList;
    @OneToMany(mappedBy = "seccion")

    private List<FacturaProveedor> facturaProveedorList;
    @OneToMany(mappedBy = "seccion")

    private List<Examen> examenList;
    @OneToMany(mappedBy = "seccion")
    private List<MovimientoAux> movimientoAuxList;
    @OneToMany(mappedBy = "seccion")
    private List<Movimiento> movimientoList;
    @OneToMany(mappedBy = "seccion")
    private List<Declaracion> declaracionList;
    @OneToMany(mappedBy = "seccion")
    private List<Factura> facturaList;
    @OneToMany(mappedBy = "seccion")
    private List<Proveedor> proveedorList;
    @OneToMany(mappedBy = "seccion")
    private List<Horario> horarioList;
    @OneToMany(mappedBy = "seccion")
    private List<Vehiculo> vehiculoList;
    @OneToMany(mappedBy = "seccion")
    private List<Profesor> profesorList;
    @OneToMany(mappedBy = "seccion")
    private List<Alumno> alumnoList;
    @JoinColumn(name = "id_cliente", referencedColumnName = "id")
    @ManyToOne(optional = false)
    private Cliente cliente;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "nombre")
    private String nombre;

    public Seccione() {
    }

    public Seccione(Integer id) {
        this.id = id;
    }

    public Seccione(Integer id, String nombre, Cliente cliente) {
        this.id = id;
        this.nombre = nombre;
        this.cliente = cliente;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

   

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Seccione)) {
            return false;
        }
        Seccione other = (Seccione) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.evangelion.core.bean.Seccione[ id=" + id + " ]";
    }

    public Cliente getCliente() {
        return cliente;
    }

    public void setCliente(Cliente cliente) {
        this.cliente = cliente;
    }

    @XmlTransient
    public List<Alumno> getAlumnoList() {
        return alumnoList;
    }

    public void setAlumnoList(List<Alumno> alumnoList) {
        this.alumnoList = alumnoList;
    }

    @XmlTransient
    public List<Profesor> getProfesorList() {
        return profesorList;
    }

    public void setProfesorList(List<Profesor> profesorList) {
        this.profesorList = profesorList;
    }

    @XmlTransient
    public List<Vehiculo> getVehiculoList() {
        return vehiculoList;
    }

    public void setVehiculoList(List<Vehiculo> vehiculoList) {
        this.vehiculoList = vehiculoList;
    }

    @XmlTransient
    public List<Horario> getHorarioList() {
        return horarioList;
    }

    public void setHorarioList(List<Horario> horarioList) {
        this.horarioList = horarioList;
    }

    @XmlTransient
    public List<Proveedor> getProveedorList() {
        return proveedorList;
    }

    public void setProveedorList(List<Proveedor> proveedorList) {
        this.proveedorList = proveedorList;
    }

    @XmlTransient
    public List<Factura> getFacturaList() {
        return facturaList;
    }

    public void setFacturaList(List<Factura> facturaList) {
        this.facturaList = facturaList;
    }

    @XmlTransient
    public List<Declaracion> getDeclaracionList() {
        return declaracionList;
    }

    public void setDeclaracionList(List<Declaracion> declaracionList) {
        this.declaracionList = declaracionList;
    }

    @XmlTransient
    public List<MovimientoAux> getMovimientoAuxList() {
        return movimientoAuxList;
    }

    public void setMovimientoAuxList(List<MovimientoAux> movimientoAuxList) {
        this.movimientoAuxList = movimientoAuxList;
    }

    @XmlTransient
    public List<Movimiento> getMovimientoList() {
        return movimientoList;
    }

    public void setMovimientoList(List<Movimiento> movimientoList) {
        this.movimientoList = movimientoList;
    }

    @XmlTransient
    public List<Examen> getExamenList() {
        return examenList;
    }

    public void setExamenList(List<Examen> examenList) {
        this.examenList = examenList;
    }


    @XmlTransient
    public List<FacturaAlumno> getFacturaAlumnoList() {
        return facturaAlumnoList;
    }

    public void setFacturaAlumnoList(List<FacturaAlumno> facturaAlumnoList) {
        this.facturaAlumnoList = facturaAlumnoList;
    }


    @XmlTransient
    public List<FacturaProveedor> getFacturaProveedorList() {
        return facturaProveedorList;
    }

    public void setFacturaProveedorList(List<FacturaProveedor> facturaProveedorList) {
        this.facturaProveedorList = facturaProveedorList;
    }


  
    
}
